package cn.org.seventh.web.annotation;

import org.springframework.web.servlet.view.InternalResourceView;
import org.springframework.web.servlet.view.JstlView;
import org.springframework.web.servlet.view.RedirectView;
import org.springframework.web.servlet.view.freemarker.FreeMarkerView;
import org.springframework.web.servlet.view.jasperreports.JasperReportsMultiFormatView;
import org.springframework.web.servlet.view.velocity.VelocityView;
import org.springframework.web.servlet.view.xslt.XsltView;

/**
 * 这里定义的视图类型都是基于路径或者说基于模板的 这些类型都应该可以做i10n或i18n的 OTHER这种类型表示不希望自动处理视图
 * 希望定制视图或者按SPRING自带解析器处理
 * 
 * @author Seventh
 * 
 */
public enum ViewType {

	JSP(JstlView.class), FREEMARKER(FreeMarkerView.class), VELOCITY(
			VelocityView.class), REDIRECT(RedirectView.class), FORWARD(
			InternalResourceView.class), JASPER(
			JasperReportsMultiFormatView.class), XSLT(XsltView.class), OTHER(
			View.class);
	private Class type;

	private ViewType(Class type) {
		this.type = type;
	}

	public Class getType() {
		return type;
	}

	public void setType(Class type) {
		this.type = type;
	}

}
